package com.zzyl.sex.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zzyl.sex.mapper.SexServiceMapper;
import com.zzyl.sex.domain.SexService;
import com.zzyl.sex.service.ISexServiceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 性服务Service业务层处理
 * 
 * @author 张亮
 * @date 2025-09-14
 */
@Service
public class SexServiceServiceImpl extends ServiceImpl<SexServiceMapper, SexService> implements ISexServiceService
{
    @Autowired
    private SexServiceMapper sexServiceMapper;

    /**
     * 查询性服务
     * 
     * @param id 性服务主键
     * @return 性服务
     */
    @Override
    public SexService selectSexServiceById(String id)
    {
        return getById(id);
    }

    /**
     * 查询性服务列表
     * 
     * @param sexService 性服务
     * @return 性服务
     */
    @Override
    public List<SexService> selectSexServiceList(SexService sexService)
    {
        return sexServiceMapper.selectSexServiceList(sexService);
    }

    /**
     * 新增性服务
     * 
     * @param sexService 性服务
     * @return 结果
     */
    @Override
    public int insertSexService(SexService sexService)
    {
        return save(sexService) == true? 1 : 0;
    }

    /**
     * 修改性服务
     * 
     * @param sexService 性服务
     * @return 结果
     */
    @Override
    public int updateSexService(SexService sexService)
    {
        return updateById(sexService) == true ? 1 : 0;
    }

    /**
     * 批量删除性服务
     * 
     * @param ids 需要删除的性服务主键
     * @return 结果
     */
    @Override
    public int deleteSexServiceByIds(String[] ids)
    {
        return removeByIds(Arrays.asList(ids)) == true ? 1 : 0;
    }

    /**
     * 删除性服务信息
     * 
     * @param id 性服务主键
     * @return 结果
     */
    @Override
    public int deleteSexServiceById(String id)
    {
        return removeById(id) == true ? 1 : 0;
    }
}
